package com.example.hello;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class FullscreenActivity extends Activity {
	@SuppressWarnings({ "rawtypes", "unchecked" })
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_fullscreen);

		Category db = new Category(this);
	 db.addCategory("GATE");
		 db.addCategory("TECH");
		db.addCategory("CATS");
		 db.addCategory("GRE");

		List<Map<String, ArrayList<String>>> _data = db
				.getCategoryDetails("cat_name");

		Log.v("Return data count", String.valueOf(_data.size()));

		Map<String, ArrayList<String>> _map_data = new HashMap<String, ArrayList<String>>();
				
		for (int j = 0; j < _data.size(); j++) {
		
			_map_data = _data.get(j);

			Iterator iter = _map_data.entrySet().iterator();
			while (iter.hasNext()) {
				Map.Entry mEntry = (Map.Entry) iter.next();
				String key = mEntry.getKey().toString();
				ArrayList<String> _value = (ArrayList<String>) mEntry
						.getValue();
				for (int i = 0; i < _value.size(); i++) {
					Log.v(key, _value.get(i));
				}
			}
		}

		// Log.v(tag, msg);

		Log.v("Count:: ", db.getCategoryCount());

	}
}